package com.jiaquyun.jcps.mode.api

import com.jiaquyun.jcps.entity.UserInfoResponse
import com.jiaquyun.jcps.mode.BaseApi
import com.lemlin.network.HttpServiceApi
import com.lemlin.network.HttpServiceData
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

interface AccessApi : HttpServiceApi {

    @FormUrlEncoded
    @POST("/rider/user/mobilelogin")
    fun mobileLogin(
        @Field("mobile") mobile: String,
        @Field("captcha") captcha: String
    ): Observable<UserInfoResponse>

    @FormUrlEncoded
    @POST("/rider/sms/send")
    fun smsSend(
        @Field("mobile") mobile: String,
        @Field("event") event: String = "mobilelogin"
    ): Observable<HttpServiceData>
}